package v1

import (
	"blog/upload"
	"blog/utils"
	"github.com/gin-gonic/gin"
	"net/http"
)

func Upload(c *gin.Context){
	multipartFile,_ := c.FormFile("file")
	file,_:=multipartFile.Open()
	fileSize := multipartFile.Size
	url,code := upload.UploadFileToQiniu(file,fileSize)
	utils.HttpResponse(c,http.StatusOK,code,"",url)
}
